package com.skynet.springcloud.consumer.auth.service;

import com.skynet.springcloud.consumer.auth.dto.UserAuthDTO;
import com.skynet.springcloud.consumer.auth.vo.ResultVO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "auth",fallback = UserAuthServiceHystrix.class)
public interface UserAuthService {

    @PostMapping("/api/login")
    ResultVO login(@RequestBody UserAuthDTO userAuthDTO);

    @PostMapping("/api/register")
    ResultVO register(@RequestBody UserAuthDTO userAuthDTO);

    @DeleteMapping("/api/logout")
    ResultVO logout();

    @PostMapping("/api/request-pass")
    ResultVO requestPass(@RequestBody UserAuthDTO userAuthDTO);

    @PutMapping("/api/reset-pass")
    ResultVO resetPass(@RequestBody UserAuthDTO userAuthDTO);

}
